from django.db import models

 
class Categories(models.Model):
 title = models.CharField(max_length=50)

class Posts(models.Model):
 title = models.CharField(max_length=100)
 body = models.TextField()
 created = models.DateTimeField()
 Categories=models.ForeignKey(Categories)
 
def __unicode__(self):
 return self.title
 
class Page(models.Model):
 topic = models.CharField(max_length=50)
 body = models.TextField()
